home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
jaz_clib.arc
/
JZSTRCAT.C
< prev
next >
Wrap
Text File
|
1989-04-09
|
1KB
|
36 lines
/*
┌────────────────────────────────────────────────────────────────────────────┐
│jzstrcat.c │
│Concatenate multiple strings together in one function call using a variable │
│number of parameters. │
│Simply put a null string (0) as the last argument in the function. │
│Synopsis: │
│ char *wdir,wstr[255]; │
│ │
│ *wdir = "MSC"; │
│ *wstr=0; │
│ │
│ jzstrcat(wstr,"\\",wdir,"\\","JAZ",0); │
│ │
│ (wstr now equals "\MSC\JAZ") │
└────────────────────────────────────────────────────────────────────────────┘
*/
jzstrcat(fstr,fparm)
char *fstr;
char *fparm;
{
int w;
/**
** We are going to loop through the addresses of the parmameters.
** Effectively looking at our arguments on the stack
**/
for (w = 0 ; *(*(&fparm + w)) ; w ++) /* until we hit a null string */
strcat(fstr,*(&fparm + w)); /* reference the address of the parms */
}